package com.richest.api.controller.messagerecord;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.*;

import com.richest.api.service.IMessageRecordService;
import com.richest.util.CallResults;

/**
 * 消息记录
 * 
 * @author zhaohongchao
 * @email 70375739@qq.com
 * @date 2019-03-05 08:42:07
 */
@RestController
@RequestMapping("messageRecordController")
@Api(value = "消息记录")
@EnableAutoConfiguration
public class ApiMessageRecordController {
	@Autowired
	private IMessageRecordService messageRecordService;

	@RequestMapping(value = "getMessageList", produces = "application/json;charset=UTF-8")
	@ApiOperation(notes = "获取消息列表", value = "获取消息列表", httpMethod = "GET")
	@ApiImplicitParam(name = "user_id", value = "用户id", required = true, paramType = "query", dataType = "Long")
	public CallResults getMessageList(@RequestParam Long user_id) {
		return CallResults.ok().put("data", messageRecordService.selectList());
	}
}
